<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>四川大学教育基金会项目管理系统<?php echo $navtitle;?></title>
<link href="./image/<?php echo $_G['style'];?>/common.css" type="text/css" rel="stylesheet" />
<link href="./image/easyui.css" type="text/css" rel="stylesheet" />
<script src="./js/jquery-1.4.4.min.js" type="text/javascript"></script>
<script src="./js/jquery.easyui.min.js" type="text/javascript"></script>
<script src="./js/common.js" type="text/javascript"></script>
</head>

<body<?php if(defined('CURSCRIPT')) echo ' class="'.CURSCRIPT.'"';?>>

<div class="container">
	<div id="topline"><?php echo rgmdate($_G['timestamp'], 'Y年m月d日 D');?></div>
	<div class="header"></div>

	<div class="nav">
        <ul id="navlist">
            <li><a href="index.php">首页</a></li>
            <li><a href="project.php?action=list">项目列表</a></li>
            <li><a href="project.php?action=add">添加项目</a></li>
            <li><a href="project.php?action=addprocess">添加项目进程</a></li>
            <li><a href="project.php?action=search">搜索项目</a></li>
            <li><a href="tool.php">工具</a></li>
            <li><a href="admincp.php">管理员</a></li>
            <li><a href="admincp.php?action=logout">退出系统</a></li>
        </ul>
        <script type="text/javascript">
        var index = true;
        $('#navlist a').each(function(){
            if(this.href == location.href){
                $(this).addClass('current');
                index = false;
            }
        });
        </script>
    </div>
	
	<div class="side">
		<div class="profile">
        	<h3>管理员登录</h3>
			<div class="avatar">
				<img src="<?php echo $_G['admin']->v['avatar'];?>" onerror="this.src='./image/noavatar.gif';" />
			</div>
			<div class="info">
				<span class="name"><?php echo $_G['admin']->v['username']?></span>
				<span class="group"><?php echo $_G['admin']->isSuperAdmin() ? '所有者' : '管理员';?></span>
				<span class="lastlogin"><?php echo $_G['admin']->v['lastlogin'] ? '您上次登录于'.rgmdate($_G['admin']->v['lastlogin']) : '这是您首次登录本系统';?></span>
			</div>
		</div>
	
		<div class="box1">
			<h3>常用操作</h3>
			<ul>
				<li><a href="tool.php?action=export">导出项目数据</a></li>
				<li><a href="tool.php?action=import">导入项目数据</a></li>
				<li><a href="admincp.php?action=edit">修改个人密码</a></li>
				<li><a href="system.php?action=type">管理项目类型</a></li>
			</ul>
		</div>
		
		<?php if($_G['admin']->isSuperAdmin()){?>
		<div class="box1">
			<h3>所有者权限</h3>
			<ul>
				<li><a href="system.php?action=config">系统配置</a></li>
				<li><a href="system.php?action=editadmin">添加管理员</a></li>
				<li><a href="system.php?action=listadmin">查看管理员</a></li>
			</ul>
		</div>
		<?php }?>
	</div>
	
	<div class="content">